::WS::Utils::ServiceTypeDef Client FreshBookApi PaymentDefinition {
    client_id       {type string minOccurs 1 maxOccurs 1}
    invoice_id      {type string minOccurs 0 maxOccurs 1}
    date            {type string minOccurs 0 maxOccurs 1}
    amount          {type string minOccurs 0 maxOccurs 1}
    currency_code   {type string minOccurs 0 maxOccurs 1}
    type            {type string minOccurs 0 maxOccurs 1}
    notes           {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi PaymentUpdate {
    payment_id  {type string minOccurs 1 maxOccurs 1}
    amount      {type string minOccurs 0 maxOccurs 1}
    notes       {type string minOccurs 0 maxOccurs 1}
    currency_code   {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi PaymentDetails {
    payment_id  {type string minOccurs 1 maxOccurs 1}
    client_id       {type string minOccurs 1 maxOccurs 1}
    invoice_id      {type string minOccurs 0 maxOccurs 1}
    date            {type string minOccurs 0 maxOccurs 1}
    amount          {type string minOccurs 0 maxOccurs 1}
    currency_code   {type string minOccurs 0 maxOccurs 1}
    type            {type string minOccurs 0 maxOccurs 1}
    notes           {type string minOccurs 0 maxOccurs 1}
    updated         {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi PaymentListArray {
    payment    {type PaymentDetails()}
}


::WS::Client::DefineRestMethod FreshBookApi payment payment.create {
    payment    {type PaymentDefinition}
} {
    payment_id {type string}
}

::WS::Client::DefineRestMethod FreshBookApi payment payment.update {
    payment    {type PaymentUpdate}
} {}

::WS::Client::DefineRestMethod FreshBookApi payment payment.get {
    payment_id {type string}
} {
    payment    {type PaymentDetails}
}

::WS::Client::DefineRestMethod FreshBookApi payment payment.list {
    client_id   {type string minOccurs 1 maxOccurs 1}
    invoice_id  {type string minOccurs 0 maxOccurs 1}
    date_from   {type string minOccurs 0 maxOccurs 1}
    date_to     {type string minOccurs 0 maxOccurs 1}
    update_from {type date minOccurs 0 maxOccurs 1}
    update_to {type date minOccurs 0 maxOccurs 1}
    page        {type string minOccurs 0 maxOccurs 1}
    per_page    {type string minOccurs 0 maxOccurs 1}
} {
    payments    {type PaymentListArray}
}
